import Vue from 'vue'
import VueRouter from 'vue-router'

import Home from '@/views/Home/Home'
import Find from '@/views/Find/Find'
import Personality from '@/views/Personality/Personality'
Vue.use(VueRouter)

const routes = [
  {
    path:'/',
    redirect:'/home'
  },{
    path:'/home',
    component:Home,
    redirect:'/home/find',
    children:[{
      redirect:'/home/find/personality',
      path:'find',
      component:Find,
      // 三级子路由
      children:[{
        path:'personality',
        component:Personality
      }]
      //  二级路由
    },{
      path:'search',
      component:()=>import('@/views/Search/Search.vue')
    },{
      // 下面设置视频路由和MV路由模块
      path:'move',
      component: () => import('@/views/Move/Move.vue'),
      redirect: '/home/move/mv',
      children:[{
        path:'shipin',
        component:()=>import('@/views/Move/Shipin/Shipin.vue')
      },{
        path:'mv',
        component:()=>import('@/views/Move/MV/MV.vue')
      }]
    },{
      path:'mvinfo/:mvid',
      name:'MVINFO',
      component: () => import('@/views/MvInfo/MvInfo')
    }]
  }
]

const router = new VueRouter({
  routes
})

export default router
